package ltd.dujiabao.orderservice.controller;

import jakarta.validation.Valid;
import ltd.dujiabao.orderservice.domain.dto.CreateOrderDto;
import ltd.dujiabao.orderservice.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Bowie Du
 * @date 2025/7/22 20:01
 */

@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;

    @PostMapping("/createOrder")
    public void createOrder(@RequestBody @Valid CreateOrderDto dto) {
        orderService.createOrder(dto);
    }
}
